package com.codes.model;

import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Size;
import java.util.Date;

// 物流信息
public class Logistics {
    private Integer id;
    //@Size(min = 1,max = 20,message = "名字的长度必须为1到20")
    @ApiModelProperty(value="司机id",example="01")
    private Integer driverId;
    @Size(min = 1,max = 20,message = "名字的长度必须为1到20")
    @ApiModelProperty(value="用户名字",example="小明")
    private String driverName;
    @Size(min = 1,max = 20,message = "名字的长度必须为1到20")
    @ApiModelProperty(value="车次",example="第一车")
    private String trainNo;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="规定送达时间",example="2020-05-23 19:30:00")
    private Date setTime;
    @ApiModelProperty(value="需求申请工单id",example="2")
    private Integer workOrderId;
    @ApiModelProperty(value="物流单完成状态 0未完成1正常送达2延迟",example="1")
    private Integer finishState;
    @ApiModelProperty(value="物流未完成原因 ",example="堵车")
    private String finishCause;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="实际送达时间",example="2020-05-23 19:30:00")
    private Date actualTime;
    @Size(min = 1,max = Integer.MAX_VALUE,message = "必填")
    @ApiModelProperty(value="构件",example="水泥50吨")
    private String component;

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDriverId() {
        return driverId;
    }

    public void setDriverId(Integer driverId) {
        this.driverId = driverId;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName == null ? null : driverName.trim();
    }

    public String getTrainNo() {
        return trainNo;
    }

    public void setTrainNo(String trainNo) {
        this.trainNo = trainNo == null ? null : trainNo.trim();
    }

    public Date getSetTime() {
        return setTime;
    }

    public void setSetTime(Date setTime) {
        this.setTime = setTime;
    }

    public Integer getWorkOrderId() {
        return workOrderId;
    }

    public void setWorkOrderId(Integer workOrderId) {
        this.workOrderId = workOrderId;
    }

    public Integer getFinishState() {
        return finishState;
    }

    public void setFinishState(Integer finishState) {
        this.finishState = finishState;
    }

    public String getFinishCause() {
        return finishCause;
    }

    public void setFinishCause(String finishCause) {
        this.finishCause = finishCause == null ? null : finishCause.trim();
    }

    public Date getActualTime() {
        return actualTime;
    }

    public void setActualTime(Date actualTime) {
        this.actualTime = actualTime;
    }
}